package com.zbf.order.web;

import com.zbf.order.mapper.TestOrderMapper;
import org.apache.ibatis.session.ExecutorType;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;
import org.apache.ibatis.session.SqlSessionFactoryBuilder;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @author: LCG
 * 作者: LCG
 * 日期: 2021/3/29  8:06
 * 描述:
 */
@RestController
public class TestMybatisXontroller {

    @Autowired
    private SqlSessionFactory sqlSessionFactory;

    @RequestMapping("test00")
    public void test01(){

        ExecutorType batch = ExecutorType.BATCH;

        SqlSession sqlSession = sqlSessionFactory.openSession();

        TestOrderMapper mapper = sqlSession.getMapper(TestOrderMapper.class);

        Map<String, Object> orderInfo = mapper.getOrderInfo("3");
        mapper.getOrderInfo("3");
        System.out.println(orderInfo);

    }




}
